package com.example.mall.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 订单物流表
 * </p>
 *
 * @author whale
 * @since 2025-05-09
 */
@TableName("tb_order_shipments")
public class OrderShipments extends Model<OrderShipments> {

    private static final long serialVersionUID = 1L;

    /**
     * 物流记录唯一标识
     */
    @TableId("shipment_id")
    private Long shipmentId;
    /**
     * 订单ID
     */
    @TableField("order_id")
    private Long orderId;
    /**
     * 物流公司名称
     */
    private String carrier;
    /**
     * 物流单号
     */
    @TableField("tracking_number")
    private String trackingNumber;
    /**
     * 物流状态（0：待发货，1：运输中，2：已送达 3已取消）
     */
    private Integer status;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    public OrderShipments() {
        this.shipmentId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getShipmentId() {
        return shipmentId;
    }

    public void setShipmentId(Long shipmentId) {
        this.shipmentId = shipmentId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getCarrier() {
        return carrier;
    }

    public void setCarrier(String carrier) {
        this.carrier = carrier;
    }

    public String getTrackingNumber() {
        return trackingNumber;
    }

    public void setTrackingNumber(String trackingNumber) {
        this.trackingNumber = trackingNumber;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "OrderShipments{" +
        ", shipmentId=" + shipmentId +
        ", orderId=" + orderId +
        ", carrier=" + carrier +
        ", trackingNumber=" + trackingNumber +
        ", status=" + status +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
